import java.util.List;

import junit.framework.TestCase;


public class testOperations extends TestCase {

	public void testOperate() throws UnoperableException {
		
		List exp = new Lista();
		List exp1 = new Lista();
		
		exp.add(1.0);
		exp.add(2.0);
		//exp.add(exp1);

		//System.out.println((Lista)Operations.operate("(car '((1 2) 3))", Stored.getVar()));
		//System.out.println(exp);
		
		assertEquals(exp.toString(), Operations.operate("(car '((1 2) 3))", Stored.getVar()).toString());
		assertEquals(exp.toString(), Operations.operate("(cdr '(3 1 2))", Stored.getVar()).toString());
		assertEquals("20.0", Operations.operate("(+ (/ 10 2) (* 5 (- 5 2)))", Stored.getVar()).toString());
		Operations.operate("(setq a '(1 2))", Stored.getVar());
		assertEquals(exp.toString(), Operations.operate("a", Stored.getVar()).toString());
		
		
	}

}
